<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>@yield('title')</title>
    <link rel="stylesheet" type="text/css" href="{{asset('static')}}/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="{{asset('static')}}/css/dashboard.css" />
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">新闻视界管理后台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">zhang</a></li>
                <li><a href="{{url('admin/loginout')}}">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar" style="padding: 0;">
            <div class="panel-group" id="accordion">

                <div class="panel @if(isset($menuControllerName) && $menuControllerName=='category') panel-success @else panel-info @endif">
                    <div class="panel-heading">
                        <a href="#category" data-toggle="collapse" data-parent="#accordion">
                            <h3 class="panel-title">分类管理</h3>
                        </a>
                    </div>
                    <div id="category" class="collapse   @if(isset($menuControllerName) && $menuControllerName=='category') in @endif panel-collapse" panel-collapse">
                        <div class="panel-body" style="padding:0;">
                            <ul class="list-group" style="margin-bottom: 0;">
                                <li class="list-group-item"><a href="{{url('admin/category/index')}}">分类列表</a></li>
                                <li class="list-group-item"><a href="{{url('admin/category/add')}}">添加分类</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="panel @if(isset($menuControllerName) && $menuControllerName=='news') panel-success @else panel-info @endif">
                    <div class="panel-heading">
                        <a href="#news" data-toggle="collapse" data-parent="#accordion">
                            <h3 class="panel-title">新闻管理</h3>
                        </a>
                    </div>
                    <div id="news" class="collapse @if(isset($menuControllerName) && $menuControllerName=='news') in @endif panel-collapse">
                        <div class="panel-body" style="padding:0;">
                            <ul class="list-group" style="margin-bottom: 0;">
                                <li class="list-group-item"><a href="{{url('admin/news/index')}}">新闻列表</a></li>
                                <li class="list-group-item"><a href="{{url('admin/news/add')}}">添加新闻</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            @if(Session::has('message'))
                <div id="myAlert" class="alert alert-danger">
                <a href="javascript:$('#myAlert').hide(1000);"
                   class="close">&times;</a>
            {{Session::get('message')}}</div>
                    @endif
            @yield('main')
        </div>
    </div>
</div>

<script type="text/javascript" src="{{asset('static')}}/js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="{{asset('static')}}/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>